﻿@{
    Layout = null;
    Sysconfig config = ViewData["config"] as Sysconfig;
    Payment payModel = ViewData["payModel"] as Payment;
    Orders orderModel = ViewData["orderModel"] as Orders;
    string action = ViewBag.action as string;
    string order_type = ViewBag.order_type as string;
}
<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>支付中心</title>
    <link rel="stylesheet" type="text/css" href="/mobile/css/style.css" />
    <script type="text/javascript" charset="utf-8" src="/mobile/js/zepto.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/weui.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/common.js"></script>
</head>

<body ontouchstart>
    <div class="page">
        <!--页面头部-->
        <div class="header">
            <a class="back" href="javascript:history.back();">
                <i class="iconfont icon-arrow-left"></i>
            </a>
            <h3>支付中心</h3>
            <div class="right">
                <a class="weui-cell_access weui-cell_link" asp-area="Web" asp-controller="Index" asp-action="Index">
                    <i class="iconfont icon-home"></i>
                </a>
            </div>
        </div>
        <!--/页面头部-->
        <!--页面内容-->
        <div class="page__bd">
            @if(action=="confirm")
            {
            <form id="payForm" name="payForm" method="post" action="/payments/@payModel.api_path/index">
                <input id="pay_order_no" name="pay_order_no" type="hidden" value="@ViewBag.order_no" />
                <input id="pay_order_amount" name="pay_order_amount" type="hidden" value="@ViewBag.order_amount" />
                <input id="pay_user_name" name="pay_user_name" type="hidden" value="@ViewBag.user_name" />

                @if(order_type=="recharge")
                {
                <!--充值确认-->
                <input id="pay_subject" name="pay_subject" type="hidden" value="账户充值" />
                <div class="weui-form-preview form-preview" style="margin-top:10px;">
                    <div class="weui-form-preview__hd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">充值金额</label>
                            <em class="weui-form-preview__value">¥@ViewBag.order_amount</em>
                        </div>
                    </div>
                    <div class="weui-form-preview__bd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">订单号</label>
                            <span class="weui-form-preview__value">@ViewBag.order_no</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">支付方式</label>
                            <span class="weui-form-preview__value">@payModel.title</span>
                        </div>
                    </div>
                    <div class="weui-form-preview__ft">
                        <button id="btnSubmit" type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary">确认付款</button>
                    </div>
                </div>
                <!--充值确认-->
                }
                else if(order_type=="buygoods")
                {
                <!--商品订单-->
                <input id="pay_subject" name="pay_subject" type="hidden" value="购买商品" />
                <div class="weui-form-preview form-preview" style="margin-top:10px;">
                    <div class="weui-form-preview__hd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">支付金额</label>
                            <em class="weui-form-preview__value">¥@ViewBag.order_amount</em>
                        </div>
                    </div>
                    <div class="weui-form-preview__bd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">订单号</label>
                            <span class="weui-form-preview__value">@ViewBag.order_no</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">支付方式</label>
                            <span class="weui-form-preview__value">@payModel.title</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">收件人</label>
                            <span class="weui-form-preview__value">@orderModel.accept_name</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">送货地址</label>
                            <span class="weui-form-preview__value">@orderModel.area @orderModel.address</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">手机号码</label>
                            <span class="weui-form-preview__value">@orderModel.mobile</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">固定电话</label>
                            <span class="weui-form-preview__value">@orderModel.telphone</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">订单备注</label>
                            <span class="weui-form-preview__value">@orderModel.message</span>
                        </div>
                    </div>
                    <div class="weui-form-preview__ft">
                        <button id="btnSubmit" type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary">确认付款</button>
                    </div>
                </div>
                <!--/商品订单-->
                }
            </form>
            }

            @if(action=="succeed")
            {
            <!--支付成功-->
            <div class="weui-msg msg-box">
                <div class="weui-msg__icon-area">
                    <i class="weui-icon-success weui-icon_msg"></i>
                </div>
                <div class="weui-msg__text-area">
                    <h2 class="weui-msg__title">支付成功</h2>
                    <p class="weui-msg__desc">
                        支付已经成功，可以点击下方按钮进入会员中心查看订单。
                    </p>
                </div>
                <div class="weui-msg__opr-area">
                    <p class="weui-btn-area">
                        <a class="weui-btn weui-btn_primary" asp-area="Web" asp-controller="Usercenter" asp-action="Index" asp-route-act="index">会员中心</a>
                        <a class="weui-btn weui-btn_default" asp-area="Web" asp-controller="Index" asp-action="Index">返回首页</a>
                    </p>
                </div>

            </div>
            <!--/支付成功-->
            }

            @if(action=="error")
            {
            <!--支付失败-->
            <div class="weui-msg msg-box">
                <div class="weui-msg__icon-area">
                    <i class="weui-icon-warn weui-icon_msg"></i>
                </div>
                <div class="weui-msg__text-area">
                    <h2 class="weui-msg__title">支付失败</h2>
                    <p class="weui-msg__desc">
                        支付失败，可以点击下方按钮进入会员中心查看订单，如您确实已支付，请与我们客服人员联系！
                    </p>
                </div>
                <div class="weui-msg__opr-area">
                    <p class="weui-btn-area">
                        <a class="weui-btn weui-btn_primary" asp-area="Web" asp-controller="Usercenter" asp-action="Index" asp-route-act="index">会员中心</a>
                        <a class="weui-btn weui-btn_default" asp-area="Web" asp-controller="Index" asp-action="Index">返回首页</a>
                    </p>
                </div>
            </div>
            <!--/支付失败-->
            }

            @if(action=="login")
            {
            <!--会员登录-->
            <div class="weui-msg msg-box">
                <div class="weui-msg__icon-area">
                    <i class="weui-icon-info weui-icon_msg"></i>
                </div>
                <div class="weui-msg__text-area">
                    <h2 class="weui-msg__title">尚未登录</h2>
                    <p class="weui-msg__desc">
                        账户尚未登录或已超时，如已是会员请登录后操作，尚未注册会员请先注册会员。
                    </p>
                </div>
                <div class="weui-msg__opr-area">
                    <p class="weui-btn-area">
                        <a class="weui-btn weui-btn_primary" asp-area="Web" asp-controller="Usercenter" asp-action="Index" asp-route-act="index">账户登录</a>
                        <a class="weui-btn weui-btn_default" asp-area="Web" asp-controller="Register" asp-action="Index">免费注册</a>
                    </p>
                </div>
            </div>
            <!--/会员登录-->
            }

            @if(action=="recharge")
            {
            <!--余额不足-->
            <div class="weui-msg msg-box">
                <div class="weui-msg__icon-area">
                    <i class="weui-icon-warn weui-icon_msg-primary"></i>
                </div>
                <div class="weui-msg__text-area">
                    <h2 class="weui-msg__title">余额不足</h2>
                    <p class="weui-msg__desc">
                        您的余额不足本次支付，请充值后再进行付款，有任何问题随时与我们客服联系！
                    </p>
                </div>
                <div class="weui-msg__opr-area">
                    <p class="weui-btn-area">
                        <a class="weui-btn weui-btn_primary" asp-area="Web" asp-controller="Useramount" asp-action="Index" asp-route-act="recharge">账户充值</a>
                        <a class="weui-btn weui-btn_default" asp-area="Web" asp-controller="Index" asp-action="Index">返回首页</a>
                    </p>
                </div>
            </div>
            <!--/余额不足-->
            }

            <!--版权信息-->
            @await Html.PartialAsync("~/Areas/Web/Views/Shared/_Copyright.cshtml")
            <!--/版权信息-->
            <!--底部导航-->
            @await Html.PartialAsync("~/Areas/Web/Views/Shared/_Footer.cshtml")
            <!--/底部导航-->

        </div>
        <!--/页面内容-->

    </div>
</body>
</html>